import httpll from "./api_.js"
let ip = "127.0.0.1"
let dk = "8008"
let ipdk = 'http://' + ip + ':' + dk
const api = {
	ipdk: ipdk,

	// 客户个人信息
	iUserLogin: function(data) {
		return httpll(ipdk + "/individualUser/login", "post", data, {
			'content-type': 'application/json'
		})
	},
	iUserRegister: function(data) {
		return httpll(ipdk + "/individualUser/register", "post", data, {
			'content-type': 'application/json'
		})
	},
	iUserUpdateIntegral: function(data) {
		return httpll(ipdk + "/individualUser/updateIntegral", "post", data, {
			'content-type': 'application/json'
		})
	},
	// 企业用户个人信息
	eUserLogin: function(data) {
		return httpll(ipdk + "/enterpriseUsers/enterpriseUsersLogin", "post", data, {
			'content-type': 'application/json'
		})
	},
	eUserRegister: function(data) {
		return httpll(ipdk + "/enterpriseUsers/enterpriseUsersRegister", "post", data, {
			'content-type': 'application/json'
		})
	},
	eUserUpdateIntegral: function(data) {
		return httpll(ipdk + "/enterpriseUsers/updateEnterpriseUsers", "post", data, {
			'content-type': 'application/json'
		})
	},

	// 公司信息
	companyFindById: function(data) {
		return httpll(ipdk + "/company/findById?id=" + data, "get", {}, {
			'content-type': 'application/json'
		})
	},
	companyFind: function() {
		return httpll(ipdk + "/company/query", "post", {}, {
			'content-type': 'application/json'
		})
	},

	// 订单信息
	orderList: function(data) {
		return httpll(ipdk + "/order/findByUserid", "post", data, {
			'content-type': 'application/json'
		})
	},
	orderfindById: function(id) {
		return httpll(ipdk + "/order/findById?id=" + id, "get", {}, {
			'content-type': 'application/json'
		})
	},
	updateOrder: function(data) {
		return httpll(ipdk + "/order/updateOrder", "post", data, {
			'content-type': 'application/json'
		})
	},
	addOrder: function(data) {
		return httpll(ipdk + "/order/addOrder", "post", data, {
			'content-type': 'application/json'
		})
	},

	// 签到信息
	addSignin: function(data) {
		return httpll(ipdk + "/signin/addSignin", "post", data, {
			'content-type': 'application/json'
		})
	},
	querySignin: function(userid) {
		return httpll(ipdk + "/signin/query?id=" + userid, "get", {}, {
			'content-type': 'application/json'
		})
	},

	// 评论信息
	addEvaluation: function(data) {
		return httpll(ipdk + "/evaluation/addEvaluation", "post", data, {
			'content-type': 'application/json'
		})
	},
	evaluationFindByUserid: function(userid) {
		return httpll(ipdk + "/evaluation/findByUserid?id=" + userid, "get", {}, {
			'content-type': 'application/json'
		})
	},

	// 商品信息
	goodsFindById: function(id) {
		return httpll(ipdk + "/goods/findById?id=" + id, "get", {}, {
			'content-type': 'application/json'
		})
	},
	goodsQuery: function() {
		return httpll(ipdk + "/goods/query", "get", {}, {
			'content-type': 'application/json'
		})
	},
}
export default api
